
/*
H5与原生页面需要映射的页面
key是h5的路由
value是原生的支付路由
 */
var NativePage={
	paths:{
		"/book/pay":"/user/pay",
		"/home":"/user/home",
		"/login/LoginVistorView/*":"/user/login",
		"/book/query/start":"/query/result"
	},
	match:function (path) { 
		var matchKey;
		for(var key in this.paths){ 
			if(key.indexOf("*")>-1){
				var a=key.substring(0,key.indexOf("*"));
				if(path.indexOf(a)>-1){
					matchKey=key;
				}
			}
			else if(key==path)
			{
				matchKey=key;
			}
			if(matchKey){
				break;
			}
		}
		return this.paths[matchKey]
	}
}; 
 
module.exports=NativePage;